home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_nub_surfacelightning.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
76 lines
# Jones 3D Cog Script
#
# NUB_surfaceLightning.cog
#
# [TL] [RD]
#
# (C) 1999 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
message timer
message startup
thing origin0 # Lightning targets.
thing target0
thing player local
material lightningmat0=aet_4sfx_lightning_v2_a.mat local # Mats for the lightning.
material lightningmat1=aet_4sfx_lightning_v2_b.mat local
material lightningmat2=aet_4sfx_lightning_v2_c.mat local
material lightningmat3=aet_4sfx_lightning_v2_d.mat local
material lightningmat4=aet_4sfx_lightning_v2_e.mat local
sound strike0=aet_lightning_01.wav local
sound strike1=aet_lightning_02.wav local
sound strike2=aet_lightning_03.wav local
sound strike3=aet_lightning_04.wav local
int toggle local
int cnt local
int randnum local
int damagesec local
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
SetTimer(1.0);
return;
# ........................................................................................
timer:
# Lightning code.
if (toggle == 0)
{
for (cnt = 2; cnt <= RandBetween(2, 5); cnt = cnt + 1)
{
CreatePolylineThing(origin0, target0, '0 0 0', lightningmat0[RandBetween(0, 4)], 0.05, 0.05, 0.05);
randnum = RandBetween(0, 3);
PlaySoundThing(strike0[randnum], target0, 0.2, -1, -1, 0);
Sleep(0.05);
}
}
if (toggle == 1)
{
CreatePolylineThing(origin0, player, '0 0 0', lightningmat0[RandBetween(0, 4)], 0.05, 0.05, 0.05);
randnum = RandBetween(0, 3);
PlaySoundThing(strike0[randnum], target0, 0.2, -1, -1, 0);
DamageThing(player, 100, 0x1, damagesec);
}
SetTimer(Rand() * 3.5);
return;
# ........................................................................................
end